package com.dt.global.web.mar.articleQuery.impl;

import javax.annotation.Resource;

import org.hibernate.HibernateException;
import org.springframework.stereotype.Service;

import com.dt.components.exhibernate.mgr.HibernateMgrImpl;
import com.dt.components.page.model.PageModel;
import com.dt.global.entitys.bo.TWebCoreArticle;
import com.dt.global.web.dao.articleQuery.ArticleQueryDao;
import com.dt.global.web.mar.articleQuery.ArticleQueryMar;

/**
 * 首页新闻查询的实现类
 * @author MWG
 *
 */
@SuppressWarnings("rawtypes")
@Service
public class ArticleQueryMarImpl extends HibernateMgrImpl implements ArticleQueryMar{
	@Resource
    private ArticleQueryDao articleQuery;
	public PageModel getTWebCoreArticleChannelId(PageModel pm, String channelId)
			throws HibernateException {
		try {
			return articleQuery.getTWebCoreArticleChannelId(pm, channelId);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public TWebCoreArticle getTWebCoreArticleId(String articleId)
			throws HibernateException {
		try {
			return articleQuery.getTWebCoreArticleId(articleId);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public PageModel getTWebCoreArticleTitle(PageModel pm, String title,String pid)
			throws HibernateException {
		try {
			return articleQuery.getTWebCoreArticleTitle(pm, title, pid);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public PageModel getdaibiaofcPageQuery(PageModel pm, String channelId)
			throws HibernateException {
		try {
			return articleQuery.getdaibiaofcPageQuery(pm, channelId);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}

}
